﻿using System;
using System.Collections.Generic;
using System.Text;
using NFinal.Action;

namespace NFinal.ActionResults
{
    public class StatusCodeResult : ActionResult
    {
        public int StatusCode { get; set; }
        public StatusCodeResult(int statusCode)
        {
            this.StatusCode = statusCode;
        }
        public override void ExecuteResult<TContext, TRequest>(AbstractAction<TContext, TRequest> context)
        {
            context.response.statusCode = this.StatusCode;
            context.response.stream = System.IO.Stream.Null;
        }
    }
}
